package com.seednia.module.util.file.dto;

import com.seednia.foundation.framework.dto.AbstractRecord;

public class FileDto extends AbstractRecord {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4983700476789287774L;
	
	private String name; // physical name
	private String title; // title
	private String contentType;
	private String length;

	private String repositoryId; // where the file is located

	// Many to one mappings:
	private com.seednia.module.core.user.dto.UserDto creatorDto = null; /* The author of the post  */ 

	public FileDto() {
	}
	
	

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}


	public String getContentType() {
		return contentType;
	}
	public void setContentType(String contentType) {
		this.contentType = contentType;
	}

	public String getLength() {
		return length;
	}
	public void setLength(String length) {
		this.length = length;
	}

	public String getRepositoryId() {
		return repositoryId;
	}
	public void setRepositoryId(String repositoryId) {
		this.repositoryId = repositoryId;
	}

	public com.seednia.module.core.user.dto.UserDto getCreatorDto() {
		return creatorDto;
	}
	public void setCreatorDto(com.seednia.module.core.user.dto.UserDto creatorDto) {
		this.creatorDto = creatorDto;
	}

	@Override
	public Long getCreatorSid() {
		return creatorDto != null ? creatorDto.getSid() : null;
	}
	@Override
	public String getCreatorId() {
		return creatorDto != null ? creatorDto.getId() : null;
	}
}
